home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Sound / Normalize / README < prev    next >
Text File  |  2002-10-27  |  15KB  |  314 lines

  1.  
  2. Note for Amiga users:
  3.  
  4. Please download and install the ixemul environment, available in my website.
  5. It makes easier to install and increase compatibility with programs that use
  6. ixemul.library.
  7. Email me if you have problems: fr3dy@ya.com
  8.  
  9. ------------------------------------------------------------------------
  10. This is release 0.7.6 of Normalize, a wave file volume normalizer.
  11. Copyright (C) 1999--2002, Chris Vaill <cvaill@cs.columbia.edu>
  12.  
  13. Normalize is an overly complicated tool for adjusting the volume of
  14. wave files to a standard level.  This is useful for things like
  15. creating mixed CD's and mp3 collections, where different recording
  16. levels on different albums can cause the volume to vary greatly from
  17. song to song.
  18.  
  19. Send bug reports, suggestions, comments to cvaill@cs.columbia.edu.
  20.  
  21. normalize is free software.  See the file COPYING for copying conditions.
  22.  
  23.  
  24. -------------------------------------------------------------------------
  25. INSTALLATION SYNOPSIS
  26.  
  27. ./configure
  28. make
  29. make install
  30.  
  31. See the file INSTALL for more extensive directions.
  32. See the man page, normalize.1, for usage.
  33.  
  34.  
  35. -------------------------------------------------------------------------
  36. DEPENDENCIES
  37.  
  38.  
  39. These dependencies are optional. Normalize doesn't require any other
  40. packages to compile and run.
  41.  
  42. MAD library (http://www.mars.org/home/rob/proj/mpeg/).
  43.  
  44.   Normalize will use the MAD MPEG Audio Decoder library if you have it
  45.   (highly recommended). This gives normalize the ability to read mp3
  46.   files. MAD support in normalize was developed using MAD version
  47.   0.14.2b; other versions may not work.
  48.  
  49.   You can run configure with the --without-mad option to turn off mp3
  50.   read support.
  51.  
  52. XMMS (http://www.xmms.org).
  53.  
  54.   If you have xmms installed, the configure system will build the
  55.   xmms-rva plugin, which honors the relative volume adjustment frames
  56.   that normalize adds to ID3 tags. The option --disable-xmms prevents
  57.   the plugin from being built.
  58.  
  59. Audiofile library (http://oss.sgi.com/projects/audiofile/).
  60.  
  61.   Normalize can use the audiofile library if version 0.2.2 or later is
  62.   available on your system. This gives normalize the ability to read
  63.   and write AIFF, AIFF-C, WAV, NeXT/Sun .snd/.au, Berkeley/IRCAM/CARL,
  64.   and whatever else the audiofile library people decide to implement
  65.   in the future.
  66.  
  67.   Audiofile support is not turned on by default, because the built-in
  68.   WAV support is faster (only because it's specifically tailored for
  69.   PCM WAVs), and because I'm guessing most people only ever need to
  70.   normalize standard PCM WAV and mp3 files.  If you only want to use
  71.   normalize on standard PCM WAV and mp3 files, you don't need
  72.   audiofile.  If, however, you would like to be able to normalize all
  73.   the different audio file formats that audiofile handles, run
  74.   configure with the --with-audiofile option to turn on audiofile
  75.   support.
  76.  
  77.  
  78. -------------------------------------------------------------------------
  79. QUESTIONS AND ANSWERS
  80.  
  81.  
  82. 1 What platforms does normalize work on?
  83.        I've tested normalize on GNU/Linux and FreeBSD on x86,
  84.        Solaris on Sparc, and Irix on MIPS. I've heard that it
  85.        works on GNU/Linux on Alpha and on BeOS R5. As far as Win­
  86.        dows is concerned, you can compile it using the Cygwin
  87.        toolkit. Question 7, below, contains a brief overview of
  88.        this process.
  89.  
  90.        I've tried to make the code as portable as possible, so
  91.        I'd appreciate hearing whether normalize works on other
  92.        platforms.
  93.  
  94. 2 What is normalize useful for?
  95.        Let's say you've got a bunch of wav files containing what
  96.        are, in your estimation, Elvis's greatest hits, collected
  97.        from various albums. You want to encode them as mp3's and
  98.        add them to an established collection, but since they're
  99.        all from different albums, they're all recorded at differ­
  100.        ent volumes from each other and from the rest of your mp3
  101.        collection. If you've been using normalize on all your wav
  102.        files before you encode them, your collection is normal­
  103.        ized to the default volume level, and you want these new
  104.        additions to be at the same level. Just run normalize with
  105.        no options on the files, and each will be adjusted to the
  106.        proper volume level:
  107.  
  108.             normalize "Hound Dog.wav" "Blue Suede Shoes.wav" \
  109.                       "Here Comes Santa Claus.wav" ...
  110.  
  111.        Example 2. Suppose now you've just extracted all the wav
  112.        files from the Gorilla Biscuits album "Start Today,"
  113.        which, you may know, is recorded at a particularly low
  114.        volume. We want to make the whole album louder, but indi­
  115.        vidual tracks should stay at the same volume relative to
  116.        each other. For this we use batch mode. Say the files are
  117.        named 01.wav to 14.wav, and are in the current directory.
  118.        We invoke normalize in batch mode to preserve the relative
  119.        volumes, but otherwise, everything's the default:
  120.  
  121.             normalize -b *.wav
  122.  
  123.        You can then fire up your mp3 encoder, and the whole album
  124.        will be uniformly louder.
  125.  
  126.        Example 3. Now suppose we want to encode the Converge
  127.        album "When Forever Comes Crashing."  This album has one
  128.        song, "Ten Cents," that is really quiet while the rest of
  129.        the songs have about the same (loud) volume.  We'll turn
  130.        up the verbosity so we can see what's going on:
  131.  
  132.             > normalize -bv *.wav
  133.             Computing levels...
  134.             Level for track01.cdda.wav: -9.3980dBFS (0.0000dBFS peak)
  135.             Level for track02.cdda.wav: -9.2464dBFS (-0.1538dBFS peak)
  136.             Level for track03.cdda.wav: -8.6308dBFS (-0.2520dBFS peak)
  137.             Level for track04.cdda.wav: -8.7390dBFS (0.0000dBFS peak)
  138.             Level for track05.cdda.wav: -8.1000dBFS (-0.0003dBFS peak)
  139.             Level for track06.cdda.wav: -8.2215dBFS (-0.1754dBFS peak)
  140.             Level for track07.cdda.wav: -8.9346dBFS (-0.1765dBFS peak)
  141.             Level for track08.cdda.wav: -13.6175dBFS (-0.4552dBFS peak)
  142.             Level for track09.cdda.wav: -9.0107dBFS (-0.1778dBFS peak)
  143.             Level for track10.cdda.wav: -8.1824dBFS (-0.4519dBFS peak)
  144.             Level for track11.cdda.wav: -8.5700dBFS (-0.1778dBFS peak)
  145.             Standard deviation is 1.47 dB
  146.             Throwing out level of -13.6175dBFS (different by 4.58dB)
  147.             Average level: -8.6929dBFS
  148.             Applying adjustment of -3.35dB...
  149.  
  150.        The volume of "Ten Cents," which is track 8, is 4.58 deci­
  151.        bels off the average, which, given a standard deviation of
  152.        1.47 decibels, makes it a statistical aberration (which
  153.        I've defined as anything off by more that twice the stan­
  154.        dard deviation, but you can set a constant decibel thresh­
  155.        old with the -t option).  Therefore, it isn't counted in
  156.        the average, and the adjustment applied to the album isn't
  157.        thrown off because of one song.  Although the aberrant
  158.        song's volume is not counted in the average, it is
  159.        adjusted along with the rest of the files.
  160.  
  161.        Example 4. Finally, say you want to make a mixed CD of
  162.        80's songs for your mom or something.  You won't allow any
  163.        80's songs to taint your hallowed mp3 collection, so the
  164.        absolute volumes of these tracks don't matter, as long as
  165.        they're all about the same, so mom doesn't have to keep
  166.        adjusting the volume.  For this, use the mix mode option,
  167.  
  168.             normalize -m *.wav
  169.  
  170.        and each track will be adjusted to the average level of
  171.        all the tracks.
  172.  
  173. 3 How does normalize work?
  174.        A little background on how normalize computes the volume
  175.        of a wav file, in case you want to know just how your
  176.        files are being munged:
  177.  
  178.        The volumes calculated are RMS amplitudes, which corre­
  179.        spond (roughly) to perceived volume. Taking the RMS ampli­
  180.        tude of an entire file would not give us quite the measure
  181.        we want, though, because a quiet song punctuated by short
  182.        loud parts would average out to a quiet song, and the
  183.        adjustment we would compute would make the loud parts
  184.        excessively loud.
  185.  
  186.        What we want is to consider the maximum volume of the
  187.        file, and normalize according to that. We break up the
  188.        signal into 100 chunks per second, and get the signal
  189.        power of each chunk, in order to get an estimation of
  190.        "instantaneous power" over time. This "instantaneous
  191.        power" signal varies too much to get a good measure of the
  192.        original signal's maximum sustained power, so we run a
  193.        smoothing algorithm over the power signal (specifically, a
  194.        mean filter with a window width of 100 elements). The max­
  195.        imum point of the smoothed power signal turns out to be a
  196.        good measure of the maximum sustained power of the file.
  197.        We can then take the square root of the power to get maxi­
  198.        mum sustained RMS amplitude.
  199.  
  200.        As for the default target amplitude of 0.25 (-12dBFS),
  201.        I've found that it's pretty close to the level of most of
  202.        my albums already, but not so high as to cause a lot of
  203.        limiting on quieter albums. You may want to choose a dif­
  204.        ferent target amplitude, depending on your music collec­
  205.        tion (just make sure you normalize everything to the same
  206.        amplitude if you want it to all be the same volume!).
  207.  
  208.        Regarding clipping: since version 0.6, a limiter is
  209.        employed to eliminate clipping. The limiter is on by
  210.        default; you don't have to do anything to use it. The 0.5
  211.        series had a -c option to turn on limiting, but that lim­
  212.        iter caused problems with inexact volume adjustment. The
  213.        new limiter doesn't have this problem, and the -c option
  214.        is considered deprecated (it will be removed in version
  215.        1.0).
  216.  
  217.        Please note that I'm not a recording engineer or an elec­
  218.        trical engineer, so my signal processing theory may be
  219.        off. I'd be glad to hear from any signal processing wiz­
  220.        ards if I've made faulty assumptions regarding signal
  221.        power, perceived volume, or any of that fun signal theory
  222.        stuff.
  223.  
  224. 4 Why don't you normalize using peak levels instead of RMS amplitude?
  225.        Well, in early (unreleased) versions, this is how it
  226.        worked. I found that this just didn't work well. The vol­
  227.        ume that your ear hears corresponds more closely with
  228.        average RMS amplitude level than with peak level. There­
  229.        fore, making the RMS amplitude of two files equal makes
  230.        their perceived volume equal. (Approximately equal, any­
  231.        way: certain frequencies sound louder at the same ampli­
  232.        tude because the ear is just more sensitive to those fre­
  233.        quencies. I may try to take this into account in a future
  234.        version, but that opens up a whole new can of worms.)
  235.  
  236.        "Normalizing" by peak level generally makes files with
  237.        small dynamic range very loud and does nothing to files
  238.        with large dynamic ranges. There's not really any normal­
  239.        ization being done, it's more of a histogram expansion.
  240.        That said, since version 0.5, you can use the --peak
  241.        option to do this in normalize.
  242.  
  243. 5 Can you make normalize operate directly on mp3 files?
  244.        Version 0.7 and up can operate directly on MPEG audio
  245.        files. An mp3 file is decoded (using Robert Leslie's MAD
  246.        library) and analyzed on the fly, without the need for
  247.        large temporary WAV files. The mp3 file is then "adjusted"
  248.        by setting its relative volume adjustment information
  249.        (technically, an "RVA2" frame is set in its ID3v2 tag).
  250.        The advantage of this method is that the audio data
  251.        doesn't need to be touched, and you don't incur the cost
  252.        of re-encoding. The disadvantage is that your mp3 player
  253.        needs to read and use relative volume adjustment ID3
  254.        frames. The normalize distribution now includes a plugin
  255.        for xmms that honors volume adjustment frames. If you use
  256.        an mp3 player other than xmms, you'll have to bug the
  257.        author to support RVA2 frames in ID3 tags.
  258.  
  259.        If you'd rather change the volume of the mp3 audio data
  260.        itself, you still have to decode to WAV, normalize the
  261.        WAV, and re-encode. A script, normalize-mp3, is included
  262.        in the normalize distribution to do this for you.
  263.  
  264. 6 Can normalize operate on ogg vorbis files?
  265.        Version 0.8 will at least be able to read vorbis audio
  266.        files.  Adjusting is harder, though: the problem is that,
  267.        unlike with ID3, as far as I know there's no standardized
  268.        volume adjustment tag for ogg.  I could just use, say,
  269.        "VOLUME_ADJUST=X.XXdB" as an ogg comment, but there would
  270.        be no reason for players to support it.
  271.  
  272.        It may be possible to twiddle the vorbis data itself to
  273.        alter the volume in a lossless way.  I'm looking into
  274.        this, but it would be a big undertaking, not something
  275.        that would be finished anytime soon.
  276.  
  277.        The current situation is that you have to decode to WAV,
  278.        normalize the WAV, and re-encode.  The normalize-ogg
  279.        script is included in the normalize distribution to do
  280.        this for you.
  281.  
  282. 7 How do I use normalize in Windows?
  283.        "I click on INSTALL but nothing happens. What's wrong?"
  284.        Okay, here's the deal: normalize is free software, written
  285.        for free operating systems such as Linux and FreeBSD.
  286.        These happen to be unix-style operating systems, so nor­
  287.        malize generally works on other non-free flavors of unix
  288.        as well. Unlike Windows software, unix software such as
  289.        normalize is meant to run on many different operating sys­
  290.        tems on many different architectures, so usually it comes
  291.        in source code form and you have to compile it for your
  292.        particular setup. If you are running some form of unix,
  293.        normalize should compile right out of the box (let me know
  294.        if it doesn't!). For other operating systems, such as
  295.        Amiga, BeOS, OS/2, or Windows, you may have to jump
  296.        through some hoops to get it to compile.
  297.  
  298.        A discussion of compiling unix software for Windows is way
  299.        beyond the scope of this FAQ, but here's a quick rundown:
  300.  
  301.        1. You first need the Cygwin toolkit
  302.           (http://www.cygwin.com). After installing, start up a cygwin
  303.           bash shell.
  304.  
  305.        2. Go to the directory where you unzipped the normalize archive
  306.           -- it would be named something like normalize-x.y.z.
  307.  
  308.        3. Type "./configure", then "make", then "make install"
  309.  
  310.        4. If there were no errors, you can run normalize by typ­ ing
  311.           "normalize" at the prompt. Normalize is a command-line
  312.           utility, so you have to pass it command line options. Run
  313.           "normalize --help" for a synopsis.
  314.